package selfLearn.theList.symbol;

import org.junit.Test;


/**
 * 描述: 符号表测试
 *
 * @Package: selfLearn.theList.symbol
 * @ClassName: Test
 * @Author: 陈威
 * @CreateTime: 2022/2/16 14:33
 * @Description:
 */
public class SymbolTest {
    //有序符号表测试
    @Test
    public void symbolTableTest(){
        SymbolTable<String, Object> table = new SymbolTable<>();
        table.put("1",1);
        table.put("2",2);
        table.put("3",3);
        table.put("4",4);
        table.foreachTable();
        System.out.println(table.get("3"));
    }
    //无序符号表测试
    @Test
    public void orederSymbolTable(){
        OrderSymbolTable<String, Object> table = new OrderSymbolTable<>();
        table.put("5",5);
        table.put("4",4);
        table.put("8",8);
        table.foreachTable();
    }

}
